/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package unc.pds.facets;

import unc.pds.model.Model;


/**
 *
 * @author Mikhail
 */
public class AddAlbumFacet implements Facet {
    public AddAlbumFacet(Model object) {
        this.object = object;
    }
    private Model object;
    public String draw() throws Exception {
        String result = "";
        result += "<h4>Новый альбом:</h4>\n";
        result += "<form action=\"album-processor.jsp\" method=\"post\" onsubmit=\"return validateEmpty('name');\">\n";
        result += "<input type=\"hidden\" name=\"objid\" value=\"" + object.getKey() + "\"/>\n";
        result += "<input type=\"hidden\" name=\"action\" value=\"addalbum\"/>\n";
        result += "<p><input type=\"text\" name=\"name\" id=\"name\"/></p>\n";
        result += "<p><input type=\"submit\" value=\"Добавить\"/></p>\n";
        result += "</form>\n";
        return result;
    }
    public boolean isSide() {
        return false;
    }
}
